package com.ruoyi.system.service;

import com.ruoyi.system.domain.ChuKuDanDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.DingDanDetail;
import com.ruoyi.system.domain.RuKuDan;
import com.ruoyi.system.domain.vo.ChuKuDanAddRequest;
import com.ruoyi.system.domain.vo.ChuKuDanAuditRequest;
import com.ruoyi.system.domain.vo.ChuKuDanQuery;

import java.util.List;

/**
 * <p>
 * 出库单详情信息 服务类
 * </p>
 *
 * @author qubaofeng
 * @since 2025-02-23
 */
public interface IChuKuDanDetailService extends IService<ChuKuDanDetail> {

    boolean add(ChuKuDanAddRequest request, String username);

    boolean audit(ChuKuDanAuditRequest request, String username);

    boolean modify(ChuKuDanDetail request, String username);

    /**
     * 直入直出时，通过入库单生成出库单
     * @param ruKuDan 入库单信息
     */
    void createByRukuDan(RuKuDan ruKuDan);

    List<DingDanDetail> selectChuKuDanDetailList(ChuKuDanQuery req);

    /** 退货入库 **/
    boolean tuiKu(ChuKuDanDetail info);

    /** 直接退货，货品不入库，直接退给供应商 **/
    boolean tuiHuo(ChuKuDanDetail info);

    ChuKuDanDetail getChuKuDanDetail(Long id);
}
